 Right Browser?



How do you let your visitors know that they do or do not have the right browser to view your site? Use this JavaScript! It'll tell them if they are using the right browser and the right version, or not....

--------------------------------------------------------------------------------
 

<!-- TWO STEPS TO INSTALL RIGHT BROWSER?:

   1.  Put the code into the HEAD of your HTML document
   2.  Copy the last code into the BODY of your HTML document  -->

<!-- STEP ONE: Copy this code into the HEAD of your HTML document  -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Original:  http://www.geocities.com/SiliconValley/6052 -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function DetectBrowser (BestBrowser,BestVersion) {
var Browser = navigator.appName;
var Version = navigator.appVersion;
if (Browser == BestBrowser) {
if (Version == BestVersion) {
alert ("Congratulations, you've got just the right browser to be able to view this page properly.");
} else {
alert ("You've at least got the right browser, but the version is not the right one, so you might not be possible to view the page properly.");}
} else {
alert ("Sorry, you haven't got the right browser to view this page as it was meant to be viewed, so you'll probably not be able to view this page properly.");
   }
}
// End -->
</SCRIPT>

<!-- STEP TWO: Copy this code into the BODY of your HTML document  -->

<BODY>

<center><FONT SIZE=-1>This page is best viewed with Netscape 3.01, Windows 95 and 640x480 resolution.</FONT>
<FORM><INPUT TYPE=BUTTON VALUE="Have the right browser?" onClick="DetectBrowser ('Netscape','3.01Gold (Win95; I)')"></FORM></center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  1.46 KB  -->
